Method: Scrivito::AttributeContent#[]
- Defined in:
- app/cms/scrivito/attribute_content.rb
#[](attribute_name) ⇒ Object
Returns the value of an attribute specified by its name. Passing an invalid key will not raise an error but return nil
.
111 112 113 114 |
# File 'app/cms/scrivito/attribute_content.rb', line 111 def [](attribute_name) attribute_name = attribute_name.to_s read_attribute(attribute_name) if has_attribute?(attribute_name) end |